package com.jing.cloud.service.chat.bean;

import com.jing.cloud.service.bean.BaseBean;
import com.jing.cloud.service.util.db.annotation.Column;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * Created by 29017 on 2017/9/8.
 */
@Data()
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class Message extends BaseBean {
    @Column(index = true)
    private Long sender; //发送者id
    @Column(index = true)
    private Long target; //接收者
    private String room; //会话房间，scene 为群时 room=groupId，scene 为单聊时 userId+userId 小的在前
    @Column(index = true)
    private Long roomShard;// 分片键， scene 为群时 room=groupId，scene 为单聊时 userId+userId
    private Integer scene; // 会话场景
    private Integer type;
    private Integer type2;
    @Column(length = 20000, encrypt = true, encryptKey = "id")
    private String data;
    private String limitUsers;
    private String ticket;
    private Long localId;


}
